<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="Keywords" content="wild">
  <meta name="description" content=""/>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

  <title>deal list</title>
  <link rel="stylesheet" type="text/css" href="/static/css/common.css">
  <link rel="stylesheet" type="text/css" href="/static/css/trade.css">
  <link rel="stylesheet" type="text/css" href="/static/js/lib/datatable/datatable.css"/>

  <script type="text/javascript" src="/static/js/lib/jquery/3.2.1/jquery.js"></script>
  <script type="text/javascript" src="/static/js/lib/datatable/datatable.js"></script>
  <script type="text/javascript" src="/static/js/util/consts.js"></script>
  <script type="text/javascript" src="/static/js/util/config.js"></script>
  <script type="text/javascript" src="/static/js/util/common.js"></script>
  <script type="text/javascript" src="/static/js/util/frame.js"></script>
  <script type="text/javascript" src="/static/js/modules/trade.js"></script>

  <script type="text/javascript">
    pageConfiguration.needAuth = true;
    var dataTable = new DataTable();

    function onload() {
      renderTradeMenu(3);

      var table = $('#data-table-list');
      var index = 0;
      dataTable.init({
        src: table,
        dataTable: {
          ajax: {
            url: GlobalConfig.serverUrl + '/api/trade/dealList',
            type: 'GET',
            data: {},
            headers: getRequestHeaders(),
            error: function (xhr) {
              ExceptionHandler.handleCommonError(xhr);
            }
          },
          dataSrc: 'data',
          columns: [
            {
              title: '序号',
              render: function (row) {
                return ++index;
              }
            },
            {
              title: '股票名称',
              render: function (row) {
                return row.stockName;
              }
            },
            {
              title: '交易类型',
              render: function (row) {
                return row.tradeType;
              }
            },
            {
              title: '委托编号',
              render: function (row) {
                return row.entrustCode;
              }
            },
            {
              title: '成交编号',
              render: function (row) {
                return row.tradeCode;
              }
            },
            {
              title: '成交价格',
              render: function (row) {
                return row.price;
              }
            },
            {
              title: '成交数量',
              render: function (row) {
                return row.volume;
              }
            },
            {
              title: '时间',
              render: function (row) {
                return row.tradeTime;
              }
            }
          ],
          fnDrawCallback: function (result) {
            index = 0;
          }
        }
      });

    }

  </script>

</head>

<body>
<div id="head" class="head"></div>

<div class="container">
  <div class="innerBox">
    <ul class="menu-nav">
    </ul>
    <table id="data-table-list" class="data-table-list">
    </table>
  </div>
</div>

<div id="foot" class="foot"></div>

</body>

</html>
